﻿using NUnit.Framework;

namespace Simhopp.Common
{
    /// <summary>
    /// A test class for the LoginInfo class.
    /// </summary>
    [TestFixture]
    public class TestLogOnInfo
    {
        #region FIELD REGION
        private LogOnInfo defaultLoginInfo;
        private LogOnInfo loginInfo;
        #endregion
        #region TEST METHOD REGION
        [SetUp]
        public void Init()
        {
            defaultLoginInfo = new LogOnInfo();
            loginInfo = new LogOnInfo("staren18", "safepassword");
        }

        [Test]
        public void TestConstructors()
        {
            Assert.AreEqual("staren18", loginInfo.UserName);
            Assert.AreEqual("safepassword", loginInfo.Password);

            Assert.AreEqual("", defaultLoginInfo.UserName);
            Assert.AreEqual("", defaultLoginInfo.Password);
        }

        [Test]
        public void TestProperties()
        {
            defaultLoginInfo.UserName = "klasse45";
            defaultLoginInfo.Password = "goodpassword";

            Assert.AreEqual("klasse45", defaultLoginInfo.UserName);
            Assert.AreEqual("goodpassword", defaultLoginInfo.Password);
        }

        [TearDown]
        public void Terminate()
        {
        }
        #endregion
    }
}
